<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\PriDeviceInfo;

class VideoController extends Controller {

    const VIDEO_TYPE = 61;

    public function index(Request $request) {

        $query = PriDeviceInfo::query();
        $query -> where('dpt_id', '=', self::VIDEO_TYPE);
        $query -> select(['pdi_index', 'pdi_name', 'pdi_code as url']);
        $data = $query -> get();
        
        return $this->success('', [ 'data' => $data ]);
    }

}
